<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    function zhinum(a,b){
        var arr=[]
        if (a<=0||b<=0) {
            return false
        }
        for (let index = a; index < b; index++) {
            for(let j=2;j<index;j++){
                if (index%j===0) {
                    // arr.push(index)
                    break
                }else{
                    arr.push(index)
                    break
                }
            }
            
        }
        // console.log(arr)
        return arr
    }
    
    console.log(zhinum(-1,10))
</script>